<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>后台登陆</title>
    <meta name="description" content="">
    <meta name="keywords" content="index">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="icon" type="image/png" href="/admin/Public/admin/assets/i/favicon.png">
    <link rel="apple-touch-icon-precomposed" href="/admin/Public/admin/assets/i/app-icon72x72@2x.png">
    <meta name="apple-mobile-web-app-title" content="Amaze UI" />
    <link rel="stylesheet" href="/admin/Public/admin/assets/css/amazeui.min.css" />
    <link rel="stylesheet" href="/admin/Public/admin/assets/css/amazeui.datatables.min.css" />
    <link rel="stylesheet" href="/admin/Public/admin/assets/css/app.css">
    <script src="/admin/Public/admin/assets/js/jquery.min.js"></script>
    <script src="/admin/Public/admin/layer/layer.js"></script>
    <script type="text/javascript">
    function chkform(the){
      var that = $(the);
      var url= $(the).attr('action');
      var cs = $(the).serialize();
      $.ajax({
          url:url,
          data:cs,
          type:'POST',
          success: function(data){
              if(data.status==1){
                  layer.msg(data.info);
                  var timer = setInterval(function(){
                      clearInterval(timer);
                      window.location.href=data.url;
                  },2000);
              }else{
                  layer.msg(data.info);
              }
          }
      });
      return false;
    }
    </script>
</head>
<body data-type="login">
    <script src="/admin/Public/admin/assets/js/theme.js"></script>
    <div class="am-g tpl-g">
        <!-- 风格切换 -->
        <div class="tpl-skiner">
            <div class="tpl-skiner-toggle am-icon-cog">
            </div>
            <div class="tpl-skiner-content">
                <div class="tpl-skiner-content-title">
                    选择主题
                </div>
                <div class="tpl-skiner-content-bar">
                    <span class="skiner-color skiner-white" data-color="theme-white"></span>
                    <span class="skiner-color skiner-black" data-color="theme-black"></span>
                </div>
            </div>
        </div>
        <div class="tpl-login">
            <div class="tpl-login-content">
                <div class="tpl-login-logo">
                </div>
                <form class="am-form tpl-form-line-form" method="post" action="<?php echo U();?>" onsubmit="return chkform(this)">
                    <div class="am-form-group">
                        <input type="text" class="tpl-form-input"  placeholder="请输入账号" name="username">
                    </div>
                    <div class="am-form-group">
                        <input type="password" class="tpl-form-input" name="password"  placeholder="请输入密码">
                    </div>
                    <div class="am-form-group" >
                        <input type="text" name="yzm" class="tpl-form-input"  placeholder="请输入验证码" style="width:100px;display:inline;">
                        <img src="<?php echo U('Public/verify');?>" style="float:right" class="passcode_img" onclick="javascript:$(this).attr('src','<?php echo U('Public/verify');?>?'+Math.random());" height="36" style="border:#CCC 1px solid;">
                    </div>
                    <div class="am-form-group">
                        <a href="<?php echo U('Public/register');?>">未成为代理？点击立即注册</a>
                    </div>
                    <div class="am-form-group">
                        <button type="submit" class="am-btn am-btn-primary  am-btn-block tpl-btn-bg-color-success  tpl-login-btn">登录</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
    <script src="/admin/Public/admin/assets/js/amazeui.min.js"></script>
    <script src="/admin/Public/admin/assets/js/app.js"></script>
</body>
</html>